﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>学生信息-教学辅助系统</title>
    <!-- Bootstrap Styles-->
    <link th:href="@{/assets/css/bootstrap.css}" rel="stylesheet"/>
    <!-- FontAwesome Styles-->
    <link th:href="@{/assets/css/font-awesome.css}" rel="stylesheet"/>
    <!-- Morris Chart Styles-->

    <!-- Custom Styles-->
    <link th:href="@{/assets/css/custom-styles.css}" rel="stylesheet"/>
    <!-- Google Fonts-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <!-- TABLE STYLES-->
    <link th:href="@{/assets/js/dataTables/dataTables.bootstrap.css}" rel="stylesheet"/>
</head>

<body>
<div id="wrapper">
    <nav class="navbar navbar-default top-navbar" role="navigation">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html" >管理员系统</a>
        </div>

        <ul class="nav navbar-top-links navbar-right">
            <li style="margin: 20px 30px 0px 0px">
                <span style="color: #FFFFFF" th:text="${session.admin.opName}"></span>
            </li>

            <!-- /.dropdown -->
        </ul>
    </nav>
    <!--/. NAV TOP  -->
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">

                <li>
                    <a th:href="@{/adminInOp/toindex}"><span class="fa fa-dashboard"></span> 首页</a>
                </li>

                <li>
                    <a class="active-menu" th:href="@{/adminInOp/selectStudent}"><span class="fa fa-table"></span> 学生信息</a>
                </li>
                <li>
                    <a th:href="@{/adminInOp/selectTeacher}"><span class="fa fa-table"></span> 老师信息</a>
                </li>
                <li>
                    <a th:href="@{/adminInOp/selectAllWork}"><span class="fa fa-table"></span> 作业信息</a>
                </li>
                <li>
                    <a th:href="@{/adminInOp/toattendance}"><span class="fa fa-table"></span> 查看班级</a>
                </li>
                <li>
                    <a href="student.html"><span class="fa fa-edit"></span> 添加/管理<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a th:href="@{/adminInOp/AddStudentNameClass}">添加学生</a>
                        </li>
                        <li>
                            <a th:href="@{/adminInOp/AddTeacherBooksubject}">添加老师</a>
                        </li>
                        <li>
                            <a th:href="@{/adminInOp/AddClass}">添加班级</a>
                        </li>
                        <li>
                            <a th:href="@{/adminInOp/seleTeacherClass}">添加老师管理的班级</a>
                        </li>
                        <li>
                            <a th:href="@{/adminInOp/selectBooksubject}">添加科目</a>
                        </li>
                    </ul>
                </li>


                <!--<li>
                    <a href="empty.html"><i class="fa fa-fw fa-file"></i> Empty Page</a>
                </li>-->
            </ul>

        </div>

    </nav>
    <!-- /. NAV SIDE  -->
    <div id="page-wrapper">
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="page-header">
                        学生 <small>信息</small>
                    </h1>
                </div>
            </div>
            <!-- /. ROW  -->

            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <!--                            学生信息表-->
                            全部学生
                        </div>
                        <div style="margin: 10px 0px 10px 10px">
                            <form method="post" th:action="@{/adminInOp/selectStudent1}"
                                  style="float: left;margin-bottom: 10px" onsubmit="return trueYes()">
                                <select name="cid" id="sel" style="text-align:center;height: 26px;margin-right: 10px">
                                    <option th:value="-1">--班级--</option>
                                    <option th:each="seleallclass:${seleallclass}" th:text="${seleallclass.className}"
                                            th:value="${seleallclass.cid}"></option>
                                </select>
                                <select name="tid" id="sel1" style="text-align:center;height: 26px;margin-right: 10px">
                                    <option th:value="-1">--班导--</option>
                                    <option th:each="seleallteacher:${seleallteacher}" th:text="${seleallteacher.name}"
                                            th:value="${seleallteacher.tid}"></option>
                                </select>
                                <input type="text" placeholder="学生姓名" name="name" id="text1">
                                <button type="submit" value="搜索">搜索</button>
                            </form>


                        </div>
                        <div style="float: none"></div>
                        <div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">

                                    <thead>
                                    <tr>
                                        <!--                                        <th>学生姓名</th>-->
                                        <!--                                        <th>密码</th>-->
                                        <!--                                        <th>学号</th>-->
                                        <!--                                        <th>性别</th>-->
                                        <!--                                        <th>年龄</th>-->
                                        <!--                                        <th>生日</th>-->
                                        <!--                                        <th>手机号</th>-->
                                        <!--                                        <th>身份证</th>-->
                                        <!--                                        <th>地址</th>-->
                                        <!--                                        <th>籍贯</th>-->
                                        <!--                                        <th>民族</th>-->
                                        <td>ID:</td>
                                        <td>名字:</td>
                                        <td>密码:</td>
                                        <td>学号:</td>
                                        <td>性别:</td>
                                        <td>年龄:</td>
                                        <td>生日:</td>
                                        <td>联系方式:</td>
                                        <td>身份证:</td>
                                        <td>住址:</td>
                                        <td>籍贯:</td>
                                        <td>民族:</td>
                                    </tr>

                                    </thead>
                                    <tbody>
                                    <tr class="gradeU" th:each="seleallstudent:${seleallstudent}">
                                        <!--                                        <td>梅傻逼</td>-->
                                        <!--                                        <td>123456</td>-->
                                        <!--                                        <td>2021011901</td>-->
                                        <!--                                        <td class="center">女</td>-->
                                        <!--                                        <td class="center">30</td>-->
                                        <!--                                        <td>2003</td>-->
                                        <!--                                        <td>1008611</td>-->
                                        <!--                                        <td>360726200311154438</td>-->
                                        <!--                                        <td class="center">美国佛罗里达州</td>-->
                                        <!--                                        <td class="center">非洲</td>-->
                                        <!--                                        <td class="center">苏丹</td>-->
                                        <td th:text="${seleallstudent.sid}"></td>
                                        <td th:text="${seleallstudent.name}"></td>
                                        <td th:text="${seleallstudent.password}"></td>
                                        <td th:text="${seleallstudent.studentId}"></td>
                                        <td th:text="${seleallstudent.sex}"></td>
                                        <td th:text="${seleallstudent.age}"></td>
                                        <td th:text="${seleallstudent.birthday}"></td>
                                        <td th:text="${seleallstudent.phone}"></td>
                                        <td th:text="${seleallstudent.idCard}"></td>
                                        <td th:text="${seleallstudent.address}"></td>
                                        <td th:text="${seleallstudent.nativePlace}"></td>
                                        <td th:text="${seleallstudent.nation}"></td>
                                    </tr>
                                    </tbody>
                                </table>

                                <div align="center">
                                    <ul class="pagination" th:if="${page.totalPage}>=5">
                                        <div align="center"><span
                                                th:text="|共${page.totalRow}条，当前${page.currPage}/${page.totalPage}页|"></span>
                                        </div>
                                        <li>
                                            <a th:href="@{/adminInOp/selectStudent(currPage=${page.currPage-1})}">上一页</a>
                                        </li>
                                        <!--<li th:each="index:${#numbers.sequence(1,page.totalPage)}"><a th:href="@{/adminInOp/selectStudent(currPage=${index})}" th:text="${index}"></a></li>-->
                                        <li th:if="${page.currPage+5}<=${page.totalPage}"
                                            th:each="index:${#numbers.sequence(page.currPage,page.currPage+5)}">
                                            <a th:href="@{/adminInOp/selectStudent(currPage=${index})}"
                                               th:text="${index}"></a>
                                        </li>
                                        <li th:if="${page.currPage+5}>${page.totalPage}"
                                            th:each="index:${#numbers.sequence(page.totalPage-5,page.totalPage)}">
                                            <a th:href="@{/adminInOp/selectStudent(currPage=${index})}"
                                               th:text="${index}"></a>
                                        </li>
                                        <li>
                                            <a th:href="@{/adminInOp/selectStudent(currPage=${page.currPage+1})}">下一页</a>
                                        </li>

                                    </ul>
                                    <ul class="pagination"   th:if="${page.totalPage}<5">
                                        <span th:text="|共${page.totalRow}条，当前${page.currPage}/${page.totalPage}页|"></span>
                                        <li><a th:href="@{/adminInOp/selectStudent(currPage=${page.currPage-1})}">上一页</a></li>
                                        <li th:each="index:${#numbers.sequence(1,page.totalPage)}"><a th:href="@{/adminInOp/selectStudent(currPage=${index})}" th:text="${index}"></a></li>

                                        <li><a th:href="@{/adminInOp/selectStudent(currPage=${page.currPage+1})}">下一页</a></li>

                                    </ul>
                                </div>
                            </div>

                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>
        </div>
        <footer><p>Copyright &copy; 2023.Company name All rights reserved.More Templates <a
                href="http://www.jxgsxy.net/" target="_blank" title="江西工商">软件一班</a> - Collect from <a
                href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p></footer>
    </div>
    <!-- /. PAGE INNER  -->
</div>
<!-- /. PAGE WRAPPER  -->
<!-- /. WRAPPER  -->
<!-- JS Scripts-->
<!-- jQuery Js -->
<script th:src="@{/assets/js/jquery-1.10.2.js}"></script>
<!-- Bootstrap Js -->
<script th:src="@{/assets/js/bootstrap.min.js}"></script>
<!-- Metis Menu Js -->
<script th:src="@{/assets/js/jquery.metisMenu.js}"></script>
<!-- DATA TABLE SCRIPTS -->
<script th:src="@{/assets/js/dataTables/jquery.dataTables.js}"></script>
<script th:src="@{/assets/js/dataTables/dataTables.bootstrap.js}"></script>
<script>
    $(document).ready(function () {
        $('#dataTables-example').dataTable();
    });
</script>
<!-- Custom Js -->
<script th:src="@{/assets/js/custom-scripts.js}"></script>
<script type="text/javascript">
    function trueYes() {
        return $("#sel").val() !== "-1" || $("#sel1").val() !== "-1" || $("#text1").val() !== "";

    }

</script>

</body>
</html>

